package com.sphd.emanu.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.emanu.R;
import com.sphd.emanu.pojo.vip.Member;
import com.wzutils.TimeUtils;

import java.util.List;

/**
 * @Author Hu
 * @Time 2017/5/16 --15:27.
 * @Email 87683202@qq.com
 */
public class VipAdapter extends BaseQuickAdapter<Member, BaseViewHolder> {
    public VipAdapter(int layoutResId, List<Member> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Member item) {
            helper
                    .setText(R.id.item_vip_name_no,item.getName()+"\t"+( TextUtils.isEmpty(item.getMobile())?"":item.getMobile()))
                    .setText(R.id.item_vip_date, TimeUtils.dateToString(item.getCreateDate(),TimeUtils.YEAR_MONTH_DAY_HOUR_MIN));
    }
}
